#include "ClientReadyToPlayNetworkEvent.h"
#include "LobbyState.h"

ClientReadyToPlayNetworkEvent::ClientReadyToPlayNetworkEvent()
{
    message.header.code = NetworkEvent::CLIENT_READY_TO_PLAY;
    message.header.sizeOfData = 0;
}

ClientReadyToPlayNetworkEvent::ClientReadyToPlayNetworkEvent(const Header& header)
{
    message.header = header;
}

ClientReadyToPlayNetworkEvent::~ClientReadyToPlayNetworkEvent()
{
}

GameState* ClientReadyToPlayNetworkEvent::visitLobbyState(LobbyState* lobbyState) const
{
    return lobbyState->handleClientReadyToPlayEvent(message.header.playerId);
}

void* ClientReadyToPlayNetworkEvent::getMessageBlob()
{
    return &message;
}

size_t ClientReadyToPlayNetworkEvent::getMessageBlobSize()
{
    return sizeof(message);
}
